package com.biodiv.miracle.web.handler;

import java.util.Objects;

/**
 * @Author: tianquan
 * @CreateTime: 2025-05-27  10:55
 * @Description: 映射对象
 */
public class MappingObject {

    private String method;

    private String path;

    public MappingObject(String method, String path) {
        this.method = method;
        this.path = path;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    @Override
    public boolean equals(Object o) {
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        MappingObject that = (MappingObject) o;
        return Objects.equals(method, that.method) && Objects.equals(path, that.path);
    }

    @Override
    public int hashCode() {
        return Objects.hash(method, path);
    }

    @Override
    public String toString() {
        return "MappingObject{" +
                "method='" + method + '\'' +
                ", path='" + path + '\'' +
                '}';
    }
}
